﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Web.Framework.Svc;


namespace AuthApi.Contracts
{
    [ServiceContract]
    public interface IAuthApi
    {
        [OperationContract]
        [FaultContract(typeof(WebFrameworkFaultException))]
        bool ValidateUser(int applicationId, int companyId, String username, String password);

        [OperationContract]
        [FaultContract(typeof(WebFrameworkFaultException))]
        List<string> GetOperationsForUser(int applicationId, int companyId, String username);

        [OperationContract]
        [FaultContract(typeof(WebFrameworkFaultException))]
        List<Company> GetCompanies(int applicationId);

        [OperationContract]
        [FaultContract(typeof(WebFrameworkFaultException))]
        List<AdUser> GetUsers(int applicationId, int companyId, string userName);

        [OperationContract]
        [FaultContract(typeof(WebFrameworkFaultException))]
        bool ChangePassword(string username, string oldPassword, string newPassword);

        [OperationContract]
        [FaultContract(typeof(WebFrameworkFaultException))]
        bool ResetPassword(string username);
    }
}
